﻿using System.Collections.Generic;
using DBCodeBuilder.Core.Classes;
using DBCodeBuilder.Core.Enum;
using DBCodeBuilder.Core.Interfaces;
using HSystem.Data.DbMetadataClasses;
using Newtonsoft.Json;

namespace DBCodeBuilder.Core.Models
{
    public class TableModel : IDbObjectModel
    {
        public TableModel()
        {
            ObjectType = DbObjectType.Table;
            UserMapping = new UserMapping();
            References = new List<DbRelationship>();
            ForcedPrimaryKey = "";
        }

        [JsonIgnore]
        public string GeneratedClass { get; set; }

        [JsonIgnore]
        public string GeneratedMapping { get; set; }

        [JsonIgnore]
        public string GeneratedClassName { get; set; }

        [JsonIgnore]
        public MetaDataTable MetaData { get; set; }

        public string Name { get; set; }
        public string Owner { get; set; }
        public DbObjectType ObjectType { get; set; }
        public string ForcedPrimaryKey { get; set; }
        public UserMapping UserMapping { get; set; }
        public List<DbRelationship> References { get; set; }
        public ShapePlacementInformation ShapePlacementInfo { get; set; }
    }
}